package com.sayice.design.FlyWeight;

public class Client {
    public static void main(String[]args){
        Rank rank1=new Rank(1,"这是权限1");
        Rank rank2=new Rank(2,"这是权限2");
        Customer a=new Customer(1,rank1);
        Customer b=new Customer(2,rank1);
        Customer c=new Customer(3,rank2);
        Pool pool=new Pool();
        pool.add(a);
        pool.add(b);
        pool.add(c);
        System.out.println(pool.get(1).information);
        System.out.println(pool.get(2).information);
        System.out.println(pool.get(3).information);
    }
}